{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=672
  Verdict: Accepted
}
var n,k,max,res,l,r,m,cur,i,j:longint; a:array[1..10001] of longint; flag:boolean;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
readln(n,k);
max:=0;
for i:=1 to n do begin
    readln(a[i]);
    if a[i]>max then max:=a[i];
end;
res:=0;
l:=1;
r:=max;
m:=(l+r) div 2;
while (r-l>1) and (flag=false) do begin
      i:=1;
      cur:=0;
      while (i<=n) and (cur<k+1) do begin
            inc(cur,a[i] div m);
            inc(i);
      end;
      if (cur>=k) and (m>res) then res:=m;
      if cur>=k then l:=m else
      if cur<k then r:=m;
      m:=(l+r) div 2;
end;
i:=1;
cur:=0;
while (i<=n) and (cur<k+1) do begin
      inc(cur,a[i] div l);
      inc(i);
end;
if (cur>=k) and (l>res) then res:=l;
i:=1;
cur:=0;
while (i<=n) and (cur<k+1) do begin
      inc(cur,a[i] div r);
      inc(i);
end;
if (cur>=k) and (r>res) then res:=r;
writeln(res);
end.